//--------------------------------------------------------------------
//--------------------------------------------------------------------
//-- Class CBoard
//-- Clase con la informacion del tablero
//-- Author: Cristian Valls
//--------------------------------------------------------------------
//--------------------------------------------------------------------

#pragma once 
#ifndef __CLASS_BOARD_H__
#define __CLASS_BOARD_H__


//----Includes--------
#include <vector>
#include "BoardGameDefs.h"
using namespace std;
//--------------------

//----------------------------------------------
//-- class CBoard
//----------------------------------------------
class CBoard
{
	public:
		CBoard(unsigned int uiRows, unsigned int uiColumns):	m_uiColumns(uiRows), m_uiRows(uiColumns), 
																m_iX1(0), m_iX2(0), m_iY1(0), m_iY2(0){}

		unsigned int	GetNumRows		() const {return m_uiRows;}
		unsigned int	GetNumColumns	() const {return m_uiColumns;}
		void			Init			();
		void			DrawBoard		();
		void			Choose			(int);
		void			ChooseX_Y		(int &, int &, char*);
		bool			Check			();
		int				TokenPos		(int, int);
		bool			GameEnd			();
		bool			IsOpen			(unsigned int, unsigned int);

	private:
		CBoard();
		typedef vector<SToken> tTokenVector;

		unsigned int	m_uiRows;
		unsigned int	m_uiColumns;
		tTokenVector	m_Board;
		int				m_iX1;	//Posiciones X/Y de las fichas 1 y 2
		int				m_iX2;
		int				m_iY1;
		int				m_iY2; 
};
#endif //__CLASS_BOARD_H__